package com.fqgj.sentry.controller.pc.request;

import com.fqgj.sentry.common.exception.BizException;
import com.fqgj.sentry.common.exception.enums.ErrorCodeEnums;
import com.fqgj.sentry.common.request.ParamsObject;

import java.util.List;

/**
 * Created by ykpbean kangping.ying@yuntu-inc.com
 *
 * @description
 * @create 2017-07-26 下午3:46
 */


public class AddPolicySetVo extends ParamsObject {
    /**
     * 策略集名称
     */
    private String name;
    /**
     * 应用Id
     */
    private Long appId;
    /**
     * 事件ID
     */
    private Long eventId;
    /**
     * 说明
     */
    private String info;

    private List<String> moduleCodes;

    public List<String> getModuleCodes() {
        return moduleCodes;
    }

    public AddPolicySetVo setModuleCodes(List<String> moduleCodes) {
        this.moduleCodes = moduleCodes;
        return this;
    }

    @Override
    public void validate() {
        if (appId == null || eventId == null) {
            throw new BizException(ErrorCodeEnums.param_valid_error);
        }
    }

    public String getName() {
        return name;
    }

    public AddPolicySetVo setName(String name) {
        this.name = name;
        return this;
    }

    public Long getAppId() {
        return appId;
    }

    public AddPolicySetVo setAppId(Long appId) {
        this.appId = appId;
        return this;
    }

    public Long getEventId() {
        return eventId;
    }

    public AddPolicySetVo setEventId(Long eventId) {
        this.eventId = eventId;
        return this;
    }

    public String getInfo() {
        return info;
    }

    public AddPolicySetVo setInfo(String info) {
        this.info = info;
        return this;
    }
}
